package com.zhanghe.study.design_pattern.composite_pattern;

/**
 * @author zh
 * @date 2022/10/15 18:22
 */
public class Leaf extends Component{

    private String name;

    public Leaf(String name){
        this.name = name;
    }

    @Override
    public void doSomething() {
        System.out.println("My name is "+ name);
    }
}
